﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System.Collections.Generic;
using Toulr.Domains.Business;
using Toulr.Models;
using Toulr.Models.Enums;

#endregion

namespace Toulr.Services
{
    /// <summary>
    ///   商业逻辑服务接口定义，需要包括如下内容：
    ///   1. 新建团购、修改团购、删除团购、团购查询（今日团购、热门团购、推荐团购、历史团购)
    ///   2.
    /// </summary>
    public interface IBusinessService
    {
        #region 团购相关

        //团购相关接口定义
        /// <summary>
        ///   新建团购
        /// </summary>
        ActionResult<Promotions> CreatePromotions(Promotions promotions);

        /// <summary>
        ///   修改团购
        /// </summary>
        ActionResult<Promotions> ModifyPromotions(Promotions promotions);

        /// <summary>
        ///   删除团购信息
        /// </summary>
        ActionResult<bool> DeletePromotions(int id);

        /// <summary>
        /// 查询团购信息,这里通过团购实体对象完成对查询参数的传递
        /// 1. 今日团购 即查询所有未结束的团购
        /// 2. 热门团购 即查询所有参与团购人数超过指定人数的团购
        /// 3. 推荐团购 即查询所有是否推荐团购为True的记录
        /// 4. 历史团购 即查询所有已经完成的团购
        /// 5. 我触发的团购 、我作为店长的团购、我作为店主的团购
        /// </summary>
        /// <param name="queryCondition">这里通过团购实体对象完成对查询参数的传递</param>
        /// <param name="pageSize">单个页面显示的记录数.</param>
        /// <param name="pageNum">当前的页码</param>
        /// <returns></returns>
        ActionResult<List<Promotions>> QueryPromotions(Promotions queryCondition, int pageSize, int pageNum);

        #endregion 

    }
}